<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>过渡</title>
    <style>
        img {
            width: 200px;
            height: 150px;
            /* 
                过渡属性transition
                注意点:给元素本身加过渡属性,而不是给hover
            */
            transition: all 2s;
        }

        img:hover {
            width: 500px;
            height: 400px;
        }
    </style>
</head>

<body>
    <img src="./img/huawei.jpg" alt="">
</body>

</html>